<template>
  <div>
    <h1 @click="goback">返回上一页</h1>
    <router-link to="/bar">44</router-link>
  </div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()
console.log(router)
const goback = () => {
  router.push('/foo')
}
</script>
